<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page isELIgnored="false" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<jsp:include page="/admin/inc/incHead.jsp" flush="false"/>
<div class="row">
    <div class="col-sm-12">
        <s:iterator value="#request.noticeList" var="notice">
            <TR>
                <TD>
                    <TABLE class="table table-bordered">
                        <TBODY>
                        <TR>
                            <TD align=middle width="10%">
                                <STRONG>发布人：</STRONG>
                            </TD>
                            <TD width="30%">
                                <s:property value="#notice[1].adminName"/>
                            </TD>
                            <TD align=middle width="14%">
                                <STRONG>发布时间：</STRONG>
                            </TD>
                            <TD width="29%">
                                <s:property value="#notice[0].noticeDate"/>
                            </TD>
                            <td align="right">
                                <a class="btn btn-default"
                                   href="/notice/noticeEditPage.action?noticeId=<s:property value="#notice[0].noticeId"/>">修改</a>
                                <a class="btn btn-danger"
                                   href="#" onclick="noticeDel(<s:property value="#notice[0].noticeId"/>)">删除</a>
                            </td>
                        </TR>
                        <TR>
                            <TD align=middle>
                                <STRONG>标题：</STRONG>
                            </TD>
                            <TD colSpan=4>
                                <s:property value="#notice[0].noticeTitle"/>
                            </TD>
                        </TR>
                        <TR>
                            <TD vAlign=top align=middle>
                                <STRONG>内容：</STRONG>
                            </TD>
                            <TD colSpan=4>
                                <s:property value="#notice[0].noticeInfo" escapeHtml="false"/>
                            </TD>
                        </TR>
                        </TBODY>
                    </TABLE>
                </TD>
            </TR>
        </s:iterator>
    </div>
    <jsp:include page="/common/page.jsp" flush="true"/>
</div>
<script>
    function noticeDel(id) {
        if (confirm('您确定删除吗？')) {
            window.location.href = "<%=path %>/notice/noticeDel.action?noticeId=" + id;
        }
    }
</script>
<jsp:include page="/admin/inc/incFoot.jsp" flush="false"/>
